package com.wyl.idempotentcheck.common;

import lombok.Data;

@Data
public class CommonException extends RuntimeException{

    /**
     * 异常编码
     */
    private int code;

    /**
     * 异常信息
     */
    private String msg;


    public CommonException(Code code, String msg) {
        super("[" + code.getCode() + ":" + code.toString() +"]" + msg);
        this.code = code.getCode();
        this.msg = msg;
    }



}
